package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: springMVC
 * @description:
 * @author: Mr.peng
 * @create: 2020-05-20 10:50
 **/
//@Controller
public class inter extends AbstractController{
//    @RequestMapping("/ones")
    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        ModelAndView mac=new ModelAndView("one");
        String user=httpServletRequest.getParameter("user");
        System.out.println(user);
        //mac.addObject("ones","哈哈哈哈哈");
        httpServletRequest.getRequestDispatcher("/hello").forward(httpServletRequest,httpServletResponse);
        return mac;
    }
}
